import axios from '@/libs/api.request'

export class EmployeeInsuredApi {
  static get (path, params = {}) {
    return request.get(path, createGETParams(params))
  }

  static post (path, params = {}) {
    return request.post(path, params)
  }

  // 分页查询员工社保+公积金参保信息
  static getList (params) {
    return axios.request({
      url: '/EmployeeInsured/GetList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 分页查询员工商保参保信息
  static getCommercialList (params) {
    return axios.request({
      url: '/EmployeeInsured/GetCommercialList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 员工社保|公积金参保信息
  static getDetail (params) {
    return axios.request({
      url: '/EmployeeInsured/GetDetail',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 设置新增异动状态
  static batchUpdateAddStatus (params) {
    return axios.request({
      url: '/EmployeeInsured/BatchUpdateAddStatus',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 设置参保时间
  static batchUpateInsuredTime (params) {
    return axios.request({
      url: '/EmployeeInsured/BatchUpateInsuredTime',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 设置减少异动状态
  static batchUpdateReduceStatus (params) {
    return axios.request({
      url: '/EmployeeInsured/BatchUpdateReduceStatus',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 设置减少异动申报时间
  static batchUpateReduceDeclareDate (params) {
    return axios.request({
      url: '/EmployeeInsured/BatchUpateReduceDeclareDate',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 设置申报工资
  static batchUpateDeclareSalary (params) {
    return axios.request({
      url: '/EmployeeInsured/BatchUpateDeclareSalary',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 设置多个险种（根据险种删除除此险种之外的其他险种）
  static batchDeleteSecurity (params) {
    return axios.request({
      url: '/EmployeeInsured/BatchDeleteSecurity',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 根据参保类型和ID批量删除参保信息
  static batchDelete (params) {
    return axios.request({
      url: '/EmployeeInsured/BatchDelete',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导入并设置员工参保时间
  static importInsuredTime (params) {
    return axios.request({
      url: '/EmployeeInsured/ImportInsuredTime',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导入多个客户基数
  static importInsured (params) {
    return axios.request({
      url: '/EmployeeInsured/ImportInsured',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出错误数据附件
  static exportErrorFile (params) {
    return axios.request({
      url: '/EmployeeInsured/ExportErrorFile',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 导出
  static export (ExportType, params) {
    return axios.request({
      url: '/EmployeeInsured/Export?ExportType=' + ExportType,
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 添加险种
  static batchAddSecurity (params) {
    return axios.request({
      url: '/EmployeeInsured/BatchAddSecurity',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 查看商保替换历史
  static getCommercialHistoryList (params) {
    return axios.request({
      url: '/EmployeeInsured/GetCommercialHistoryList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }
}
